package com.liu.common.entity;

import lombok.Data;

import java.io.Serializable;

@Data
public class Result implements Serializable {

    // 访问接口是否成功
    private Boolean flag;
    // 响应状态码
    private Integer code;
    // 响应消息内容
    private String msg;
    // 响应数据
    private Object data;

    public Result(Boolean flag, Integer code, String msg, Object data) {
        this.flag = flag;
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public Result(Boolean flag, Integer code, String msg) {
        this.flag = flag;
        this.code = code;
        this.msg = msg;
    }

    public Result(Boolean flag, Integer code, Object data) {
        this.flag = flag;
        this.code = code;
        this.data = data;
    }
}
